import {createRouter,createWebHistory} from "vue-router";
import Qilin from "qilin-utils";

const routes=[
    {
        path:"/login",
        name:"login",
        component:()=>import("@/views/login/index.vue")
    },
    {
        path:"/",
        component:()=>import("@/views/home/index.vue"),
        redirect:"/index",
        children:[
            {
                path:"/index",
                component:()=>import("@/views/home/homepage.vue"),
                meta:{
                    title:"首页",
                    icon:"iconfont icon-shouye"
                }
            },
            {
                path:"/study",
                component:()=>import("@/views/study/index.vue"),
                meta:{
                    title:"学习管理",
                    icon:"iconfont icon-w_xuexi"
                },
                children:[
                    {
                        path:"/study/QilinUtils",
                        component:()=>import("@/views/study/QilinUtils/index.vue"),
                        meta:{
                            title:"QilinUtils工具库"
                        }
                    },
                    {
                        path:"/study/qilin-element3x",
                        component:()=>import("@/views/study/element3x/index.vue"),
                        redirect:"/study/qilin-element3x/1",
                        meta:{
                            title:"QilinElement3x"
                        },
                        children:[
                            {
                                path:"/study/qilin-element3x/1",
                                component:()=>import("@/views/study/element3x/guide/index.vue"),
                                meta:{
                                    title:"开发指南"
                                }
                            },
                            {
                                path:"/study/qilin-element3x/2",
                                component:()=>import("@/views/study/element3x/QilinView/index.vue"),
                                meta:{
                                    title:"QilinView"
                                }
                            },
                            {
                                path:"/study/qilin-element3x/3",
                                component:()=>import("@/views/study/element3x/QilinTable/index.vue"),
                                meta:{
                                    title:"QilinTable"
                                }
                            },
                            {
                                path:"/study/qilin-element3x/4",
                                component:()=>import("@/views/study/element3x/QilinForm/index.vue"),
                                meta:{
                                    title:"QilinForm"
                                }
                            },
                            {
                                path:"/study/qilin-element3x/5",
                                component:()=>import("@/views/study/element3x/QilinSearch/index.vue"),
                                meta:{
                                    title:"QilinSearch"
                                }
                            },
                            {
                                path:"/study/qilin-element3x/6",
                                component:()=>import("@/views/study/element3x/QilinDialog/index.vue"),
                                meta:{
                                    title:"QilinDialog"
                                }
                            },
                            {
                                path:"/study/qilin-element3x/7",
                                component:()=>import("@/views/study/element3x/QilinUploadFile/index.vue"),
                                meta:{
                                    title:"QilinUploadFile"
                                }
                            },
                            {
                                path:"/study/qilin-element3x/8",
                                component:()=>import("@/views/study/element3x/QilinUploadImage/index.vue"),
                                meta:{
                                    title:"QilinUploadImage"
                                }
                            },
                            {
                                path:"/study/qilin-element3x/9",
                                component:()=>import("@/views/study/element3x/QilinWangEditor/index.vue"),
                                meta:{
                                    title:"QilinWangEditor"
                                }
                            },
                            {
                                path:"/study/qilin-element3x/10",
                                component:()=>import("@/views/study/element3x/QilinVueEditor/index.vue"),
                                meta:{
                                    title:"QilinVueEditor"
                                }
                            },
                            {
                                path:"/study/qilin-element3x/11",
                                component:()=>import("@/views/study/element3x/QilinDrawer/index.vue"),
                                meta:{
                                    title:"QilinDrawer"
                                }
                            },
                            {
                                path:"/study/qilin-element3x/12",
                                component:()=>import("@/views/study/element3x/QilinTree/index.vue"),
                                meta:{
                                    title:"QilinTree"
                                }
                            },
                            {
                                path:"/study/qilin-element3x/13",
                                component:()=>import("@/views/study/element3x/QilinKaitify/index.vue"),
                                meta:{
                                    title:"QilinKaitify"
                                }
                            },
                        ]
                    },
                    {
                        path:"/study/vue3",
                        component:()=>import("@/views/study/vue3/index.vue"),
                        meta:{
                            title:"vue3知识库"
                        }
                    },
                    {
                        path:"/study/elementPlus",
                        component:()=>import("@/views/study/elementPlus/index.vue"),
                        meta:{
                            title:"elementPlus示例库"
                        }
                    },
                    {
                        path:"/study/project",
                        component:()=>import("@/views/study/project/index.vue"),
                        meta:{
                            title:"项目封装组件"
                        },
                        children:[
                            {
                                path:"/study/project/QilinCalendar",
                                component:()=>import("@/views/study/project/QilinCalendar/index.vue"),
                                meta:{
                                    title:"日历组件"
                                }
                            }
                        ]
                    },
                    {
                        path:"/study/skill",
                        component:()=>import("@/views/study/skill/index.vue"),
                        meta:{
                            title:"项目技能库"
                        }
                    },
                    {
                        path:"/study/echarts",
                        component:()=>import("@/views/study/echarts/index.vue"),
                        meta:{
                            title:"echarts收藏库"
                        }
                    },
                    // {
                    //     path:"/study/package",
                    //     component:()=>import("@/views/study/package/index.vue"),
                    //     meta:{
                    //         title:"二次封装组件"
                    //     },
                    //     children:[
                    //         {
                    //             path:"/study/package/QilinView",
                    //             component:()=>import("@/views/study/package/QilinView.vue"),
                    //             meta:{
                    //                 title:"查看组件"
                    //             }
                    //         },
                    //         {
                    //             path:"/study/package/QilinSearch",
                    //             component:()=>import("@/views/study/package/QilinSearch.vue"),
                    //             meta:{
                    //                 title:"搜索表单组件"
                    //             }
                    //         },
                    //         {
                    //             path:"/study/package/QilinForm",
                    //             component:()=>import("@/views/study/package/QilinForm.vue"),
                    //             meta:{
                    //                 title:"提交表单组件"
                    //             }
                    //         },
                    //         {
                    //             path:"/study/package/QilinTable",
                    //             component:()=>import("@/views/study/package/QilinTable.vue"),
                    //             meta:{
                    //                 title:"表格组件"
                    //             }
                    //         },
                    //         {
                    //             path:"/study/package/QilinDialog",
                    //             component:()=>import("@/views/study/package/QilinDialog.vue"),
                    //             meta:{
                    //                 title:"弹窗组件"
                    //             }
                    //         }
                    //     ]
                    // },
                ]
            },
            {
                path:"/log",
                component:()=>import("@/views/log/index.vue"),
                meta:{
                    title:"日志管理",
                    icon:"iconfont icon-w_xuexi"
                }
            }
        ]
    }
];

const router=createRouter({
    history:createWebHistory(),
    routes
});


export default router;
